/**
 * 接口路径配置
 */
import axios from "axios";
import base from "./base";
import qs from "qs";
const api = {
  getGoodsList(params) {
    return axios.get(base.goodsList, {
      params,
    });
  },
  getSearch(params) {
    return axios.get(base.search, {
      params,
    });
  },
  getSelectCategory(params) {
    return axios.get(base.selectCategory, { params });
  },
  // 添加商品
  addGoods(params) {
    return axios.get(base.addGoods, { params });
  },
  // 删除商品
  delGoods(params) {
    return axios.get(base.delGoods, { params });
  },
  // 修改商品
  updateGoods(params) {
    return axios.get(base.updateGoods, { params });
  },
  //  // 批量删除
  bathDelete(params) {
    return axios.get(base.bathDelete, { params });
  },

  // 登录
  getLogin(params) {
    return axios.post(base.login, qs.stringify(params));
  },
  getParams(params) {
    return axios.get(base.params, { params });
  },
  searchParams(params) {
    return axios.get(base.searchPrams, { params });
  },
  insertItemParam(params){
    return axios.get(base.insertItemParam,{params})
  },
  categoryData(params){
    return axios.get(base.categoryData,{params})
  }
};
export default api;
